export namespace main {
	
	export class FileMD5 {
	    file_name: string;
	    md5: string;
	    new_md5: string;
	    path: string;
	
	    static createFrom(source: any = {}) {
	        return new FileMD5(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.file_name = source["file_name"];
	        this.md5 = source["md5"];
	        this.new_md5 = source["new_md5"];
	        this.path = source["path"];
	    }
	}
	export class GetImageFilesResponse {
	    folder: string;
	    files: FileMD5[];
	
	    static createFrom(source: any = {}) {
	        return new GetImageFilesResponse(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.folder = source["folder"];
	        this.files = this.convertValues(source["files"], FileMD5);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}
	export class UpdateMd5Request {
	    output_folder: string;
	    files: FileMD5[];
	
	    static createFrom(source: any = {}) {
	        return new UpdateMd5Request(source);
	    }
	
	    constructor(source: any = {}) {
	        if ('string' === typeof source) source = JSON.parse(source);
	        this.output_folder = source["output_folder"];
	        this.files = this.convertValues(source["files"], FileMD5);
	    }
	
		convertValues(a: any, classs: any, asMap: boolean = false): any {
		    if (!a) {
		        return a;
		    }
		    if (a.slice) {
		        return (a as any[]).map(elem => this.convertValues(elem, classs));
		    } else if ("object" === typeof a) {
		        if (asMap) {
		            for (const key of Object.keys(a)) {
		                a[key] = new classs(a[key]);
		            }
		            return a;
		        }
		        return new classs(a);
		    }
		    return a;
		}
	}

}

